<?php
// +----------------------------------------------------------------------
// | ThinkCMF [ WE CAN DO IT MORE SIMPLE ]
// +----------------------------------------------------------------------
// | Copyright (c) 2013-2018 http://www.thinkcmf.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: 小夏 < 449134904@qq.com>
// +----------------------------------------------------------------------
namespace app\portal\validate;

use app\admin\model\RouteModel;
use think\Validate;
//验证支付类型
class BayValidate extends Validate
{
    public $rule = [
        'saomaType' => 'require|is_bay',
    ];
    protected $message = [
        'saomaType' => '请选择支付类型',
    ];


    // 自定义验证规则
    protected function is_bay($value, $rule, $data)
    {
        $data = config('bay');
        if(in_array($value,$data)){
            return true;
        }else{
            return '支付类型不存在';
        }

    }

    
}